%% 函数或者脚本说明
%{
---------------------------------------------------
*文件名: ShowDate Version 11.19
*功   能:展示别人处理好的HTL的介电参数，主要是介电常数的实部和虚部
*注意事项:
		%

---------------------------------------------------
%}
clc; clear; clf; close all;
Input_Diretory = ".\";
FullName = @(x) Input_Diretory + x + ".csv";

result1_1 = readCST(FullName('sam1-1-results'), 3, 5);
result1_2 = readCST(FullName('sam1-2-results'), 3, 5);
result2_1 = readCST(FullName('sam2-1-results'), 3, 5);
result2_2 = readCST(FullName('sam2-2-results'), 3, 5);
result3 = readCST(FullName('sam3-results'), 3, 5);
result4 = readCST(FullName('sam4-results'), 3, 5);

MaxResults = 6;
NamePool = {'result1_1', 'result1_2', 'result2_1', 'result2_2', 'result3', 'result4'};
TitlePool = {'0.823', '0.597', '0.805', '0.692', '1.689', '1.678'};

%% 介电常数
figure('Renderer', 'painters', 'Position', [500 0 420 560], 'color', [1 1 1])
title('介电常数');

for each = 1:MaxResults
    Result = eval(NamePool{each});
    subplot(MaxResults, 1, each);
    plot(Result(:, 1), Result(:, 4), 'k', 'LineWidth', 2);
    xlabel('Frequency(THz)'); ylabel(gca, 'Real part'); yyaxis right;
    plot(Result(:, 1), Result(:, 5), 'r', 'LineWidth', 2); xlim([0.2 3]);
    ylabel(gca, 'Imag part');
    title(TitlePool{each});
end
